package top.zy.service.zymallgoodsinterface.api;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;
import top.zy.service.zymallgoodsinterface.entity.Category;

import java.util.List;

/**
 * @Author: HouZeYu
 * @Description:
 * @Date: Created in 14:32 2019/7/2
 */
public interface CategoryApi {
    /***
     * 根据父节点id查询商品分类
     * @param pid
     * @return
     */
    @GetMapping("category/list")
    public List<Category> queryCategoryListByPid(@RequestParam("pid") Long pid);

    /***
     *根据品牌id查询商品分类
     * @param brandId
     * @return
     */
    @GetMapping("category/bid/{brandId}")
     List<Category> queryCategoryListByBrandId(@PathVariable("brandId") Long brandId);

    /***
     * 根据分类id查询商品分类
     * @param ids
     * @return
     */
    @GetMapping("category/list/ids")
     List<Category> queryCategoryListByIds(@RequestParam("ids") List<Long> ids);
}
